<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
		/*向上取整*/
			console.log(Math.ceil(1.4));
		/*向下取整*/
			console.log(Math.floor(1.9));
		/*四舍五入*/
			console.log(Math.round(1.6));
		/*random（）生成0-1之间的随机数*/
			console.log(Math.random());
		/*生成0-10的随机数*/
			console.log(Math.round(Math.random()*10));
		/*生成1-10的随机数*/
			console.log(Math.round(Math.random()*9)+1);
			/*生成x-y的随机数，即console.log(Math.round(Math.random()*y-x)+x);*/
		</script>
	</head>
	<body>
	</body>
</html>
